package com.ns.school.service.edu.impl;

import com.ns.school.po.edu.CourseTypeDB;
import com.ns.school.po.edu.SelectCourseVo;
import com.ns.school.po.edu.StuCourseDB;
import com.ns.school.po.edu.StudentDB;
import com.ns.school.mapper.edu.SelectCourseMapper;
import com.ns.school.service.edu.SelectCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SelectCourseImpl implements SelectCourseService {
    @Autowired
    private SelectCourseMapper selectCourseMapper;

    //查询开设课程
    @Override
    public List<SelectCourseVo> sel(SelectCourseVo selectCourseVo) {
        return selectCourseMapper.sel(selectCourseVo);
    }

    //查询课程类型
    @Override
    public List<CourseTypeDB> selType() {
        return selectCourseMapper.selType();
    }

    //查询学生id
    @Override
    public StudentDB selStudentid(String stuid) {
        return selectCourseMapper.selStudentid(stuid);
    }

    //查询是否有该课程
    @Override
    public int selCourse(StuCourseDB stuCourseDB) {
        return selectCourseMapper.selCourse(stuCourseDB);
    }

    //添加课程
    @Override
    public int addCourse(StuCourseDB stuCourseDB) {
        return selectCourseMapper.addCourse(stuCourseDB);
    }

    //修改可选人数
    @Override
    public int updateCount(StuCourseDB stuCourseDB) {
        return selectCourseMapper.updateCount(stuCourseDB);
    }


}
